package com.oldwine.user.service.impl;

import com.oldwine.user.mapper.UserMapper;
import com.oldwine.user.pojo.User;
import com.oldwine.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper; //依赖注入

    /**
     * 根据用户id查询用户信息
     * @param id 用户id
     * @return User对象
     */
    @Override
    public User findUserById(Long id) {
        return userMapper.findUserById(id);
    }
}
